<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        button{
            background-color: plum;
            border-radius:15%;
        }
        .h1{
            size: 30;
            color: palevioletred;
        }
    </style>
</head>
<body>
<button onclick="say()">
    <h1 class="h1">
        button
    </h1>
</button>
<br>
<button onclick="textColor()">
    <h1 class="h1">
        调用鸿蒙传递的函数
    </h1>
</button>
<!--<button onclick="callArkTS()">-->
<!--    <h1 class="h1">-->
<!--        前端调用应用侧函数-->
<!--    </h1>-->
<!--</button>-->
<br>
<div>
    <p id="title">
        信息
    </p>
</div>

<div>
    用户名 <input id="username"/>
</div>
<div>
    密码 <input id="userpwd"/>
</div>
<button id="login" onclick="callArkTS()">登录</button>
</body>
<script>
    //获取标签

    let text = document.getElementById('text')
    let title = document.getElementById('title')
    let usernameInput = document.getElementById("username")
    let userpwdInput = document.getElementById("userpwd");
    function say(){
        alert('message')
    }

    var param = "param: JavaScript Hello World!";
    function changetitle(param) {
        text.style.color = 'green';
        console.log(param);
    }
    // 调用无参函数时实现。
    function changetitle() {
        text.style.color = 'green';
    }

    function changetitle(){
        title.style.color = 'green';
    }
    function setMsg(msg){
        title.innerHTML = msg
    }
    function textColor(){
        changeColor()
    }


    //获取页面标签的元素
    function callArkTS(){
        let  username = usernameInput.value;
        let userpwd = userpwdInput.value;
             //给鸿蒙页面
        testObjName.test(username+"和"+userpwd);

    }
</script>
</html>